# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DataLabelingJob do
  @moduledoc """
  DataLabelingJob is used to trigger a human labeling job on unlabeled data from the following Dataset:

  ## Attributes

  *   `activeLearningConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ActiveLearningConfig.t`, *default:* `nil`) - Parameters that configure the active learning pipeline. Active learning will label the data incrementally via several iterations. For every iteration, it will select a batch of data based on the sampling strategy.
  *   `annotationLabels` (*type:* `map()`, *default:* `nil`) - Labels to assign to annotations generated by this DataLabelingJob. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this DataLabelingJob was created.
  *   `currentSpend` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleTypeMoney.t`, *default:* `nil`) - Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to date.
  *   `datasets` (*type:* `list(String.t)`, *default:* `nil`) - Required. Dataset resource names. Right now we only support labeling from a single Dataset. Format: `projects/{project}/locations/{location}/datasets/{dataset}`
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The user-defined name of the DataLabelingJob. The name can be up to 128 characters long and can consist of any UTF-8 characters. Display name of a DataLabelingJob.
  *   `encryptionSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t`, *default:* `nil`) - Customer-managed encryption key spec for a DataLabelingJob. If set, this DataLabelingJob will be secured by this key. Note: Annotations created in the DataLabelingJob are associated with the EncryptionSpec of the Dataset they are exported to.
  *   `error` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - Output only. DataLabelingJob errors. It is only populated when job's state is `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
  *   `inputs` (*type:* `any()`, *default:* `nil`) - Required. Input config parameters for the DataLabelingJob.
  *   `inputsSchemaUri` (*type:* `String.t`, *default:* `nil`) - Required. Points to a YAML file stored on Google Cloud Storage describing the config for a specific type of DataLabelingJob. The schema files that can be used here are found in the https://storage.googleapis.com/google-cloud-aiplatform bucket in the /schema/datalabelingjob/inputs/ folder.
  *   `instructionUri` (*type:* `String.t`, *default:* `nil`) - Required. The Google Cloud Storage location of the instruction pdf. This pdf is shared with labelers, and provides detailed description on how to label DataItems in Datasets.
  *   `labelerCount` (*type:* `integer()`, *default:* `nil`) - Required. Number of labelers to work on each DataItem.
  *   `labelingProgress` (*type:* `integer()`, *default:* `nil`) - Output only. Current labeling job progress percentage scaled in interval [0, 100], indicating the percentage of DataItems that has been finished.
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels with user-defined metadata to organize your DataLabelingJobs. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. Following system labels exist for each DataLabelingJob: * "aiplatform.googleapis.com/schema": output only, its value is the inputs_schema's title.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the DataLabelingJob.
  *   `specialistPools` (*type:* `list(String.t)`, *default:* `nil`) - The SpecialistPools' resource names associated with this job.
  *   `state` (*type:* `String.t`, *default:* `nil`) - Output only. The detailed state of the job.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this DataLabelingJob was updated most recently.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeLearningConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ActiveLearningConfig.t() | nil,
          :annotationLabels => map() | nil,
          :createTime => DateTime.t() | nil,
          :currentSpend => GoogleApi.AIPlatform.V1.Model.GoogleTypeMoney.t() | nil,
          :datasets => list(String.t()) | nil,
          :displayName => String.t() | nil,
          :encryptionSpec =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec.t() | nil,
          :error => GoogleApi.AIPlatform.V1.Model.GoogleRpcStatus.t() | nil,
          :inputs => any() | nil,
          :inputsSchemaUri => String.t() | nil,
          :instructionUri => String.t() | nil,
          :labelerCount => integer() | nil,
          :labelingProgress => integer() | nil,
          :labels => map() | nil,
          :name => String.t() | nil,
          :specialistPools => list(String.t()) | nil,
          :state => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:activeLearningConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ActiveLearningConfig
  )

  field(:annotationLabels, type: :map)
  field(:createTime, as: DateTime)
  field(:currentSpend, as: GoogleApi.AIPlatform.V1.Model.GoogleTypeMoney)
  field(:datasets, type: :list)
  field(:displayName)
  field(:encryptionSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EncryptionSpec)
  field(:error, as: GoogleApi.AIPlatform.V1.Model.GoogleRpcStatus)
  field(:inputs)
  field(:inputsSchemaUri)
  field(:instructionUri)
  field(:labelerCount)
  field(:labelingProgress)
  field(:labels, type: :map)
  field(:name)
  field(:specialistPools, type: :list)
  field(:state)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DataLabelingJob do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DataLabelingJob.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DataLabelingJob do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
